package com.cn.goodsadmin.service;

import com.cn.goodsadmin.po.Type;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("typeService")
public class TypeService extends BaseService{

    public List<Type> getAllType(int appid) throws Exception{
       List<Type> types= typeDao.getAllType(appid);
       return types;
    }

    public void addType(Type type)throws Exception{
        typeDao.save(type);
    }

    public void updateType(Type type)throws Exception{
        typeDao.update(type);
    }

    public void deleteType(Type type)throws Exception{
        typeDao.delete(type);
    }
}
